#pragma once

#include <vector>
#include <list>
#include <map>
#include <fstream>
#include <sstream>
using namespace std;

#ifndef tstring
#ifdef _UNICODE
#define tstring wstring
#define tostringstream wostringstream
#else
#define tstring string
#define tostringstream ostringstream
#endif
#endif


#define _USE_MATH_DEFINES
#include <math.h>


#if !defined(_MSC_VER)
	// #define _WCHAR_T_DEFINED
	#include <assert.h>
	#include <string.h>
	#define ASSERT assert
	#define _ASSERT assert
	#define _T(a) (a)

	typedef unsigned long	DWORD;
	typedef const char *	LPCSTR;
	typedef void *			LPVOID;
	typedef bool			BOOL;
	typedef long			LONG;
	#define MAX_PATH		256

	#define InterlockedIncrement(a) __sync_fetch_and_add(a, 1)
	#define InterlockedDecrement(a) __sync_fetch_and_sub(a, 1)

#else
	#include <tchar.h>
#endif

#ifndef LPCTSTR
	#ifdef UNICODE
		typedef const WCHAR * LPCTSTR;
		typedef WCHAR * LPTSTR;
	#else
		typedef const char * LPCTSTR;
		typedef char * LPTSTR;
	#endif
#endif


// #ifndef _tfopen
// 	#ifdef UNICODE
// 		#define _tfopen fopen
// 	#else
// 		#define _tfopen _wfopen
// 	#endif
// #endif

#include "CustomException.h"
#include "ArraySizeHelper.h"
#include "ZeroInit.h"
#include "RefCounted.h"

